<script type="text/javascript">
<!--

//-->
function validation()
{
$v = $('input[type=checkbox]');
if($v.is(':checked')){
if (confirm('vous voulez .... ?')) {
	document.multi_exec.submit();

	};
}else{
	alert('Choisissez au moin un élément,svp');
	
}

}
</script>
<div class="body" >




<div id="content" class="order_sum"><br><b><?=$date?>  &nbsp;[  Commandes: <?=$num?> ] [ Total: <?=number_format(array_sum($total_sum),1,'.','')?> € ]</b> <a href="javascript:void(0)"><img class="print" style="vertical-align: bottom;" src="<?=base_url()?>resources/imgs/printer.png" alt="print" title="print" height="17"></a>
<hr>
<table cellpadding="6" cellspacing="1" style="width:100%" border="0" align="center">

<tr style="background: #666;color:white;">
<td>&nbsp;</td>
<td>N&deg; de commande</td>
<td>Client</td>
<td>L'heure de commande</td>
<td>Réduction</td> 
<td>Supplément</td> 
<td>Total</td> 
<td>Emporter | Livraison</td>
<td>Réservation</td>
<td>Magazin</td>
</tr>
<form action="<?=site_url('tool/multi_exec')?>" method="post" name="multi_exec">
<?php if($orders){ foreach ($orders as $o):?>
<tr class="each_item" <?php if($o->shop_id == 1){?>style="background: #C8E685;"<?php }elseif ($o->shop_id == 2){?>style="background: #43B196;"<?php }else{?>style="background: #EF7CA5;"<?php }?>>
<td><input type="checkbox" name="item[]" value="<?=$o->order_num?>"></td>
<td><?=$o->order_num?></td>
<td><?=$o->member->firstname?>&nbsp;<?=$o->member->lastname?></td>
<td><?=$o->order_time->format('short')?></td>
<td><?=$o->discount*100?>&nbsp;%</td>
<td><?if($o->extra != NULL){?><?=$o->extra?> €<?php }else{?>-  -  -<?php }?></td>
<td><?=number_format($o->total*(1-$o->discount)+$o->extra,1,'.','')?>&nbsp;€</td>
<td><?php if($o->takeaway_time !=NULL){ echo '<b>Emporter</b> '.$o->takeaway_time; }else{ echo '<b>Livraison</b> '.$o->delivery_time; }?></td>
<td class="msg"><?=$o->reservation?></td>
<td><?=$o->shop->shop_name?></td>
</tr>
<?php endforeach; }else{ echo "<tr><td>Il n'y pas de commande...</td></tr>";}?>

</table>
<br>
<input type="hidden" name="url" value="<?=current_url()?>" >
<input type="button" value="exec" onclick="validation();">
</form>
<hr>
<?=$page_links?>
<hr>
<input type="button" value="<<= RETOUR" onclick="window.location.href='<?=site_url('tool')?>'">
</div>
</div>
<script src="<?=base_url()?>resources/js/jquery.PrintArea.js_4.js"></script>
<script>
$(".print").click(function(){

	                           $("#content").printArea( );
                      });
</script>